app.controller('result4Controller', function($scope,$http ,$controller,$sce,$rootScope) {
	$controller('baseController' , {$scope:$scope});
	$scope.status = -1;
	if(localStorage.status){
		$scope.status = localStorage.status;
	}else{
		location.href="../login.html";
	}
	
	$scope.answerFb ={};
	$scope.answerFb.subject = 4;
	$scope.answerFb.status = $scope.status;
	//搜素分页
	$scope.search=function(page, rows){
		$http.post('../answerFb/search.do?page='+page+'&rows='+rows,$scope.answerFb).success(
			function(response){
				console.log(response,'预考列表');
				$scope.answerFblist=response.rows;	//显示当前页数据
				$scope.paginationConf.totalItems=response.total;	//更新总记录数	
			}		
		);
	}
	
	$scope.updatePass=function(id,pass){
		if(pass == '0'){
			$scope.answerFb.pass = 1;
			$scope.answerFb.id = id;
			$http.post('../answerFb/update.do',$scope.answerFb).success(
					function(res){
						console.log(res,'预考列表');
						if(res.success){
					    	layer.msg(res.message,function(){
				      			self.location.reload();
				      		},{icon:1});
				      		
				      	  }else{
				      		layer.msg(res.message,{icon:1}); 
				      	  }
					}		
			);	
		}
	}
	
})